﻿using Newtonsoft.Json;
using PmSoft.Utilities.Sm4;

namespace ManagementApi.Models.BankTransfer;

public class EncryptReq
{
    /// <summary>
    /// </summary>
    /// <param name="data"></param>
    public EncryptReq(object data)
    {
        Data = Sm4Crypto.EncryptCBC(new Sm4Crypto { Data = Sm4Crypto.UrlEncode(JsonConvert.SerializeObject(data)), Key = "7361646633326173646a6e6b73616764", Iv = "sbnty74299507719" });
    }

    /// <summary>
    /// </summary>
    public string Data { get; set; } = string.Empty;
}